package org.pearl.design.demo.proxy;

/**
 * Created by TD on 2021/6/28
 */
public class Test {
    public static void main(String[] args) {
        // 创建目标对象
        Target target = new TargetObject();
        // 使用目标对象创建代理对象
        ProxyObject proxyObject = new ProxyObject(target);
        // 获取代理对象并强转
        Target jdkProxy = (Target) proxyObject.getJdkProxy();
        // 调用方法
        jdkProxy.test();
    }
}
